﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="Members.aspx.cs" Inherits="LinkCard.AdminCP.CRM.Members" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title title="Danh sách nhận email"></title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script language="javascript">
    function setValue(page) {
        location.href = 'Members.aspx?page=' + page;
    }

    function confirmAction() {
        if (confirm('Bạn muốn thực hiện hành động này ???')) {
            // you clicked the OK button.
            // you can allow the form to post the data.
            return true;
        }
        else {
            // you clicked the Cancel button.
            // you can disallow the form submission.
            return false;
        }
    }
    var $j = jQuery.noConflict(); //set no conflict so you can use with MS AJAX.


    $j(document).ready(function () {
        $j("#<%=FromDate.ClientID %>").datepicker();
        $j("#<%=ToDate.ClientID %>").datepicker();
        //$("#datepicker").datepicker();
    });
    </script>
    <section id="content">
  <section class="container_12 clearfix">
    <section id="main" class="grid_12">
      <article>
        <div class="h1">Danh sách Đăng kí nhận email</div>
     
          <div class="box search">
       
          <label >Tìm kiếm:</label>
          <input  type="text" onfocus="this.value = '';" onblur="if (this.value == 'Email') { this.value=''; }"  value="Email" size="40" id="Email"  runat="server" />
          Từ ngày&nbsp;
           <%-- <input type="text"  size="25" id="FromDate" runat="server" />--%>
             <input type="text" id="FromDate" runat="server">
         &nbsp;&nbsp;&nbsp;Đến ngày&nbsp; 
       <%--  <input type="text"  size="25" id="ToDate" runat="server" />--%>
        <input type="text" id="ToDate" runat="server">
          <asp:Button ID="btnSearch" class="button small" Style="width: 60px;"
                                runat="server" Text="Tìm kiếm" onclick="btnSearch_Click"  />
        
      </div>
          <table id="table1" class="gtable sortable" >
            <thead>
              <tr>
                 <th><input type="checkbox" class="checkall" /></th>
                <th>Email</th>
                <th>Ngày đăng kí</th>
                <th>Trạng thái</th>
             
              </tr>
            </thead>
            <tbody>
            <asp:Repeater ID="msgList" runat="server" OnItemDataBound="msgList_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                <td >
                                    <input type="checkbox" id="chkDelete" runat="server" value='<%# DataBinder.Eval(Container.DataItem, "MemberID")%>' />
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Email")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "DateCreated")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Status").ToString() == "True"? "<img src='../Template/images/icons/icon_check.gif'>":"<img src='../Template/images/icons/icon_nocheck.gif'" %>
                                </td>
                              
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <tr id="msgNoData" runat="server">
                        <td colspan="9" align="center">
                            Không có Email đăng kí nhận tin nào!
                        </td>
                    </tr>
              
              
            </tbody>
          </table>
          <div class="tablefooter clearfix">
            <div class="actions">
              <select id="ActionOption" runat="server">
                <option value="0">Thao tác</option>
                <option value="1">Xóa</option>
                <option value="2">Hủy nhận email</option>
                <option value="3">Nhận email</option>
                <option value="4">Xuất Excel</option>

              </select>
              
              <asp:Button ID="btnDelete" 
                                runat="server" Text="Thực hiện"  class="button small" 
                    style="width:80px;" onclick="btnDelete_Click" OnClientClick="javascript:return confirmAction();" />
            </div>
            <div class="pagination" id="divPager" runat="server">
              <!--<a href="#">Prev</a>-->
              <%--<a href="#" class="current">1</a> <a href="#">2</a> <a href="#">3</a> <a href="#">4</a> <a href="#">5</a> ... <a href="#">78</a> <a href="#">Trang sau</a>--%>
              <asp:Literal ID="PagerShow" runat="server"></asp:Literal>
               </div>
          </div>
        
      </article>
    </section>
    
  </section>
</section>
</asp:Content>